/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.sac.be;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Colao
 */
@Embeddable
public class DocumentoPresentadoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "FID_SAC_DOCUMENTO", nullable = false)
    private long fidSacDocumento;
    @Basic(optional = false)
    @Column(name = "FID_SAC_SOLICITUD_CREDITO", nullable = false)
    private long fidSacSolicitudCredito;

    public DocumentoPresentadoPK() {
    }

    public DocumentoPresentadoPK(long fidSacDocumento, long fidSacSolicitudCredito) {
        this.fidSacDocumento = fidSacDocumento;
        this.fidSacSolicitudCredito = fidSacSolicitudCredito;
    }

    public long getFidSacDocumento() {
        return fidSacDocumento;
    }

    public void setFidSacDocumento(long fidSacDocumento) {
        this.fidSacDocumento = fidSacDocumento;
    }

    public long getFidSacSolicitudCredito() {
        return fidSacSolicitudCredito;
    }

    public void setFidSacSolicitudCredito(long fidSacSolicitudCredito) {
        this.fidSacSolicitudCredito = fidSacSolicitudCredito;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) fidSacDocumento;
        hash += (int) fidSacSolicitudCredito;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DocumentoPresentadoPK)) {
            return false;
        }
        DocumentoPresentadoPK other = (DocumentoPresentadoPK) object;
        if (this.fidSacDocumento != other.fidSacDocumento) {
            return false;
        }
        if (this.fidSacSolicitudCredito != other.fidSacSolicitudCredito) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.upn.sigemfi.sac.be.DocumentoPresentadoPK[fidSacDocumento=" + fidSacDocumento + ", fidSacSolicitudCredito=" + fidSacSolicitudCredito + "]";
    }

}
